#include "stdafx.h"
#include "./Request.h"
#include "../NStrategy/IStrategy.h"

namespace pattern { namespace Systems { namespace Login {
namespace NCommand {

struct Private
{
	NStrategy::IStrategy*	pStrategy;
};

Request::Request()
{
	This					= new Private;

	if (This)				SetMSSQL();
}

Request::~Request()
{
	delete This;
}

void
Request::Execute(Packet * pPacket)
{
	Context * pContext		= (Context *)( pPacket );
	This->pStrategy->Execute( pContext );
}

void
Request::SetMSSQL()
{
	This->pStrategy			= NStrategy::STATIC()->MSSQL();
}

void
Request::SetOracle()
{
	This->pStrategy			= NStrategy::STATIC()->Oracle();
}

} /* NCommand */
} /* Login */ } /* Systems */ } /* pattern */
